package day04;

import java.util.Scanner;

public class GenEx01 {
    public static void main(String[] args) {                    //卖飞机票
        Scanner sc=new Scanner(System.in);
        System.out.println("Enter price");
        double price=sc.nextInt();
        System.out.println("Enter month");
        int month=sc.nextInt();
        System.out.println("Enter level, \"1\"means first, \"2\"means eco");
        int level=sc.nextInt();
        double nowPrice=0;
        if(month>=5&&month<=10){
            if(level==1) nowPrice=price*0.9;
            else if(level==2) nowPrice=price*0.85;
        }
        else if(month>10||month<5){
            if(level==1) nowPrice=price*0.7;
            else if(level==2) nowPrice=price*0.65;
        }
        System.out.println(nowPrice);
    }
}
